package com.woniuxy.joylifeforum;

import com.woniuxy.joylifeforum.controller.ChatWebSocketController;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.ConfigurableApplicationContext;

@EnableEurekaClient
@SpringBootApplication
@MapperScan("com.woniuxy.common.mapper")
public class JoylifeForumApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext configurable = SpringApplication.run(JoylifeForumApplication.class, args);
        //解决WebSocket不能注入的问题
        ChatWebSocketController.setApplicationContext(configurable);
    }

}
